<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>首页</title>
	<link rel="stylesheet" href="/Public/css/bootstrap.min.css" />
	<link rel="stylesheet" href="/Public/css/common.css" />
	<link rel="stylesheet" href="/Public/admin/admin.css" />
	<!-- style start -->
	
	<style>
		.table th{width: 140px;text-align:right;padding-right:20px;}
		.table td{width: auto;}  

	</style>

</head>
<body>
<!-- header start -->
<nav class="navbar navbar-inverse  ">
	<div class="container">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="#">JiyCms</a>
		</div>
		<div id="navbar" class="navbar-collapse collapse">
			<ul class="nav navbar-nav">
				<li class="active"><a href="#">起始页</a></li>
				<li><a href="#about">系统</a></li>
				<li><a href="#contact">内容管理</a></li>
				<li><a href="#contact">统计</a></li>
			</ul>
		</div><!--/.nav-collapse -->
	</div>
</nav>
<!-- end header -->

<!-- content start -->
	<div class="content">
		<div class="container">
			<!-- 左边菜单 -->
			<div class="col-sm-3 col-md-2 sidebar">
				 <div class="nav-bar">
	 <a href="/admin.php/Index" class="nav-item">起始页</a>
	 <a href="<?php echo U('System/index');?>" class="nav-item">系统管理</a>
	 <a href="<?php echo U('Admin/index');?>" class="nav-item">管理员</a>
	 <a href="<?php echo U('Admin/role');?>" class="nav-item">管理员角色</a>
	 <a href="<?php echo U('Contents/index');?>" class="nav-item">内容管理</a>
	 <a href="<?php echo U('Product/index');?>" class="nav-item">产品管理</a>
	 <a href="<?php echo U('Menu/index');?>" class="nav-item">导航管理</a>
	 <a href="<?php echo U('Banner/index');?>" class="nav-item">广告管理</a>
	 <a href="<?php echo U('Member/index');?>" class="nav-item">会员管理</a>
	 <a href="<?php echo U('Single/index');?>" class="nav-item">单页管理</a>
 </div>
			</div>
			<!--右边内容-->
			<div class="col-md-9">
				 
	<ol class="breadcrumb">
	  <li><a href="#">起始页</a></li> 
	  <li class="active">系统管理</li>
	</ol>
	<ul id="myTabs" class="nav nav-tabs">
		<?php if(is_array($tabs)): foreach($tabs as $k=>$val): ?><li role="presentation" class="<?php echo ($active==$k?'active':''); ?>"><a href="#<?php echo ($k); ?>"><?php echo ($val); ?></a></li><?php endforeach; endif; ?>
	</ul>
	<div id="tabsContens" class="tab-content">
		<!-- 基本配置 -->
		<?php if(is_array($tabs)): foreach($tabs as $k=>$val): ?><div role="tabpanel" class="tab-pane fade <?php echo ($active==$k?'active in':''); ?>" id="<?php echo ($k); ?>" aria-labelledby="<?php echo ($k); ?>-tab"></div><?php endforeach; endif; ?> 
	</div>  

			</div>
		</div>
	</div>
<!-- end content -->

<!-- footer start -->

	<div class="footer">
		<div class="container">底部信息</div>
	</div>
<!-- end footer -->

<!-- script start -->
<script src="/Public/js/jquery-1.11.3.min.js"></script>	
<script src="/Public/js/bootstrap.min.js"></script>	

<script>
	$(function(){
		$('#myTabs a').click(function (e) {
		  	e.preventDefault()
		  	$(this).tab('show');
		  	var type = (e.currentTarget.hash).substr(1);
		  	ajaxGetInfo(type); 
		});
		ajaxGetInfo('<?php echo ($active); ?>');d

	});
	/**
	 * ajax获取信息
	 * @return {[type]} [description]
	 */
	function ajaxGetInfo(type){
		if(type == ''){
			var type = 'web_info';
		}
		console.log(type);
		$.ajax({
	  		url:'/admin.php/System/ajaxConfig',
	  		type:'post',
	  		data:{'type':type},
	  		dataType:'json',
	  		success:function(res){
	  			var content = res.content;
	  			$("#"+type).html('');
	  			console.log(type);
	  			$("#"+type).html(content);
	  		}
	  	});
	}


</script>


</body>
</html>